<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
	"http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8_ci" />
		<meta http-equiv="X-UA-Compatible" content="IE=8" />
		<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
		<script type="text/javascript" src="jquery.quick.pagination.min.js"></script>
		<link href='http://fonts.googleapis.com/css?family=Overlock+SC' rel='stylesheet' type='text/css'>
		<link rel="stylesheet" type="text/css" href="css/website.css" />
		<script type="text/javascript">
			$(document).ready(function() {
			$("ul.pagination").quickPagination({pageSize:"6"});
			});
		</script>
	</head>
<body>
<div id="top">
	<div class="titulo"><a href="index.php">Agenda Telef&oacute;nica VCD</a></div>
	<a href="insertar.php">Insertar</a>
	<a class="current" href="mostrar.php?letra=a">Mostrar</a>
	<a href="index.php">Buscar</a>
</div>
</body>
<div id="general">
<?php
include("conexion.php");
include("funciones.php");
$letra = sqlValue($_GET['letra'], "text");
$letra= str_replace("'","",$letra);?>
<div id="letras">
	<a<?php if ($letra == "a"){?> class="current"<?php } ?> href="mostrar.php?letra=a">A</a>
	<a<?php if ($letra == "b"){?> class="current"<?php } ?> href="mostrar.php?letra=b">B</a>
	<a<?php if ($letra == "c"){?> class="current"<?php } ?> href="mostrar.php?letra=c">C</a>
	<a<?php if ($letra == "d"){?> class="current"<?php } ?> href="mostrar.php?letra=d">D</a>
	<a<?php if ($letra == "e"){?> class="current"<?php } ?> href="mostrar.php?letra=e">E</a>
	<a<?php if ($letra == "f"){?> class="current"<?php } ?> href="mostrar.php?letra=f">F</a>
	<a<?php if ($letra == "g"){?> class="current"<?php } ?> href="mostrar.php?letra=g">G</a>
	<a<?php if ($letra == "h"){?> class="current"<?php } ?> href="mostrar.php?letra=h">H</a>
	<a<?php if ($letra == "i"){?> class="current"<?php } ?> href="mostrar.php?letra=i">I</a>
	<a<?php if ($letra == "j"){?> class="current"<?php } ?> href="mostrar.php?letra=j">J</a>
	<a<?php if ($letra == "k"){?> class="current"<?php } ?> href="mostrar.php?letra=k">K</a>
	<a<?php if ($letra == "l"){?> class="current"<?php } ?> href="mostrar.php?letra=l">L</a>
	<a<?php if ($letra == "m"){?> class="current"<?php } ?> href="mostrar.php?letra=m">M</a>
	<a<?php if ($letra == "n"){?> class="current"<?php } ?> href="mostrar.php?letra=n">N</a>
	<a<?php if ($letra == "ñ"){?> class="current"<?php } ?> href="mostrar.php?letra=ñ">&Ntilde;</a>
	<a<?php if ($letra == "o"){?> class="current"<?php } ?> href="mostrar.php?letra=o">O</a>
	<a<?php if ($letra == "p"){?> class="current"<?php } ?> href="mostrar.php?letra=p">P</a>
	<a<?php if ($letra == "q"){?> class="current"<?php } ?> href="mostrar.php?letra=q">Q</a>
	<a<?php if ($letra == "r"){?> class="current"<?php } ?> href="mostrar.php?letra=r">R</a>
	<a<?php if ($letra == "s"){?> class="current"<?php } ?> href="mostrar.php?letra=s">S</a>
	<a<?php if ($letra == "t"){?> class="current"<?php } ?> href="mostrar.php?letra=t">T</a>
	<a<?php if ($letra == "u"){?> class="current"<?php } ?> href="mostrar.php?letra=u">U</a>
	<a<?php if ($letra == "v"){?> class="current"<?php } ?> href="mostrar.php?letra=v">V</a>
	<a<?php if ($letra == "w"){?> class="current"<?php } ?> href="mostrar.php?letra=w">W</a>
	<a<?php if ($letra == "x"){?> class="current"<?php } ?> href="mostrar.php?letra=x">X</a>
	<a<?php if ($letra == "y"){?> class="current"<?php } ?> href="mostrar.php?letra=y">Y</a>
	<a<?php if ($letra == "z"){?> class="current"<?php } ?> href="mostrar.php?letra=z">Z</a>
</div>
<?php
$letra= $letra.'%';
$db = new MySQL();
$consulta = $db->consulta("SELECT * FROM datos WHERE nombre LIKE '$letra' ORDER BY nombre");
if($db->num_rows($consulta)>0){?>
	<ul class="pagination">
	<?php
	while($resultados = $db->fetch_array($consulta)){?>
		<div id="fila"><li><?php mostrar_uno($resultados);?></li></div>
	<?php
	}?>
	</ul>
<?php
}
?>
</div>
</body>
</html>


